package com.itcast.service;

import java.sql.SQLException;
import java.util.List;

import com.itcast.dao.ProductDao;
import com.itcast.domain.Product;

public class ProductService {
	ProductDao dao = new ProductDao();

	public List<Product> findAll(int pageNo, int pageSize) throws SQLException {
		List<Product> list = dao.findAll(pageNo, pageSize);
		return list;
	}

	public int findTotalCount() throws SQLException {
		int totalCount = dao.finTotalCount();
		return totalCount;
	}
}
